<?php
namespace app\command\model;

use app\common\model\BaseModel;

class Perform extends BaseModel{
    public static function getLevel($perform){
        $r = self::where(['status'=>1,'is_delete'=>0])->order('performance desc')->select();
        foreach ($r as $value){
            $performance = $value['performance'];
            if($perform>=$performance){
                return $value;
            }
        }
        // 数组最后一个值为performance最小值
//        $lastIndex = count($r)-1;
        return false;
    }
}
